<template>
	<view id="nameDetail">
		<view class="memberInfo">
			<view>
				<img @click="preview(userJub.user_coronal_photograph_img)" style="width: 120rpx;height:140rpx;" :src="userJub.user_coronal_photograph_img">
			</view>
			<view class="member">
				<view class="">
					<text style="font-size: 44rpx;font-weight: bold;">{{userJub.full_name}}</text>
					<text class="floor">楼号：{{userJub.building_number}}</text>
				</view>
				<view class="member-base">
					{{userJub.sexCode == 2 ? '女' : '男'}} · {{userJub.age}}岁 · {{userJub.user_nation}} · {{userJub.user_olitical_outlook}} · {{userJub.telephone}}
				</view>
			</view>
		</view>
		<view class="member-line"></view>
		<view class="company">
			<view class="unit">单位及职务</view>
			<view class="service">{{userJub.company}}</view>
		</view>
		<view class="member-line"></view>
		<view class="company">
			<view class="unit">个人宣言</view>
			<view class="service">{{userJub.user_declaration}}！</view>
		</view>
		<!-- <view class="company" v-if="userJub.user_consumption_proof_img != null">
			<view class="unit">缴费证明</view>
			<view class="serviceImg">
				<img @click="preview(userJub.user_consumption_proof_img)" style="width:216rpx;height:216rpx;" :src="userJub.user_consumption_proof_img">
			</view>
		</view>
		<view class="member-line" v-if="userJub.user_other_img != null"></view>
		<view class="company" v-if="userJub.user_other_img != null">
			<view class="unit">辅助材料</view>
			<view class="serviceImg">
				<img @click="preview(userJub.user_other_img)" style="width:216rpx;height:216rpx;" :src="userJub.user_other_img">
			</view>
		</view> -->
		<view class="member-line"></view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				userJub:{},
				
			}
		},
		
		onLoad(option) {
			const item = JSON.parse(decodeURIComponent(option.item));
			this.userJub = item
			console.log(this.userJub)
		},
		methods:{
			// 图片预览
			preview(item) {
				uni.previewImage({
					urls: [item],
					current: 0,
					longPressActions: {
						success: function(data) {
							console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
						},
						fail: function(err) {
							console.log(err.errMsg);
						}
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	#nameDetail{
		padding: 80rpx 40rpx;
		.memberInfo{
			display: flex;
			justify-content: start;
			align-items: center;
			.member{
				margin-left: 40rpx;
			}
			.floor{
				width: 224rpx;
				height: 44rpx;
				background: #E9F7D9;
				border-radius: 6rpx;
				margin-left: 30rpx;
				color: #417505;
				padding: 8rpx;
			}
			.member-base{
				color: #666;
				font-size: 28rpx;
				margin-top: 28rpx;
			}
		}
		.member-line{
			width: 100%;
			height: 1px;
			margin-top: 60rpx;
			background: #EEEEEE;
		}
		.company{
			margin: 60rpx 0;
			.unit{
				font-size: 36rpx;
				font-weight: bold;
			}
			.service{
				font-size: 28rpx;
				margin-top: 20rpx;
			}
			.serviceImg{
				margin-top: 40rpx;
			}
		}
	}
</style>